import sys
import __builtin__
from client.gamestates.stateabstract import StateAbstract


class StateMainMenu(StateAbstract):
    def __init__(self):
        super(StateMainMenu, self).__init__("MainMenu")

    def activate(self):
        __builtin__.base.networkmanager.close_network()
        __builtin__.base.guimanager.create_mainmenu()
        self.accept("escape", sys.exit)

    def deactivate(self):
        __builtin__.base.guimanager.destroy_current_gui()
        self.ignore("escape")

    def update(self, dt):
        pass#print("updating " + self.name)